export RUSTFLAGS="-C target-cpu=native -g"
export FFI_BUILD_FROM_SOURCE=1

export RUST_LOG=info
export RUST_BACKTRACE=full

# export GOLOG_LOG_LEVEL=debug

# nogpu
# export BELLMAN_NO_GPU=1
# export BELLMAN_NO_GPU=true

# tree_c
export FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1
# tree_r_last
export FIL_PROOFS_USE_GPU_TREE_BUILDER=1

# multi sdr
# AMD 3970x 2h10m 跑完 P1 环境变量
export FIL_PROOFS_USE_MULTICORE_SDR=1
# 默认值为3
export FIL_PROOFS_MULTICORE_SDR_PRODUCERS=1

# 缓存的证明父级数目
# FIL_PROOFS_SDR_PARENTS_CACHE_SIZE=1073741824
# export FIL_PROOFS_SDR_PARENTS_CACHE_SIZE=2048
export FIL_PROOFS_SDR_PARENTS_CACHE_SIZE=4096
export FIL_PROOFS_VERIFY_CACHE=1
export FIL_PROOFS_COLUMN_WRITE_BATCH_SIZE=2097152

#export FIL_PROOFS_PARENT_CACHE_SIZE=2048

# speed or memory
export FIL_PROOFS_MAXIMIZE_CACHING=1

export GPU_DEVICE_ORDINAL=0    
export CUDA_VISIBLE_DEVICES=0 

WORKER="/home/ceshi/.lotusminer"

export TMPDIR=$WORKER/post
export LOTUS_BACKUP_BASE_PATH=$WORKER/miner-backups
export FIL_PROOFS_PARENT_CACHE="$WORKER/filecoin-parents"
export FIL_PROOFS_PARAMETER_CACHE="/home/ceshi/tmp/filecoin-proof-parameters"

#nohup lotus-miner run --wdpost-submit-delay 3 --wnpost false >> lotus-miner.log 2>&1 &

nohup lotus-miner run --wdpost-submit-delay=2  --wnpost=false >> lotus-miner.log 2>&1 &


